package total;

import java.util.Scanner;

public class Ques1276 {
	
	public void go(){
		Scanner scan = new Scanner(System.in);
		int T,n,thisSum,maxSum,times,index;
		int[] arr;
		while(scan.hasNext()){
			T = scan.nextInt();
			while(T-- > 0){
				thisSum = 0;
				maxSum = 0;
				index = 0;
				times = 0;
				n = scan.nextInt();
				arr = new int[n];
				for(int i = 0;i < n;i++){
					arr[i] = scan.nextInt();
				}
				for (int i = 0; i < arr.length; i++) {
					thisSum += arr[i];
					if(thisSum > maxSum){
						maxSum = thisSum;
						index = i;
						times++;
					}else if(thisSum > 0){
						
					}else if(thisSum < 0){
						thisSum = 0;
						times--;
					}
				}
				if(maxSum <= 0){
					System.out.println("Game over");
				}else if(times > 1){
					System.out.println(maxSum);					
				}else if(index - 1 > 0 && index + 1 < n){
					if(Math.max(maxSum + arr[index + 1], maxSum+arr[index - 1]) > 0){
						System.out.println(Math.max(maxSum + arr[index + 1], maxSum+arr[index - 1]));						
					}
				}else if(index - 1 > 0 ){
					if(maxSum + arr[index - 1] > 0){
						System.out.println(maxSum + arr[index - 1]);
					}
				}else if(index + 1 < n){
					if(maxSum + arr[index + 1] > 0){
						System.out.println(maxSum + arr[index + 1]);
					}
				}
			}
		}
	}
	
	public static void main(String[] args) {
		new Ques1276().go();
	}
}
